-- parry_ranged_damage
-- created by shuzy
-- 概率不受远程伤害

return {
    apply = function(prop, baseValue)
        return prop[3];
    end,

    -- 受到伤害时触发
    trigger = function(who, prop, damage)
        -- 概率不触发
        if DungeonM.getRandSeed("parry_ranged_damage") % 1000 >= tonumber(prop[3]) then
            return damage;
        else
            return 0;
        end
    end,

    record = function(target, prop, path)
        return false;
    end
};
